import {useEffect, useState} from "react";

function  useWindowScroll(){
  const [y,sety]=useState(0);
    window.addEventListener('scroll',function (e){
        const h=document.documentElement.scrollTop;
        console.log(h)
        sety(h);
    })
    return [y]
}
export  {useWindowScroll};